//
//  selectProvince.m
//  cityStar
//
//  Created by joyban on 15-1-27.
//  Copyright (c) 2015年 tiny. All rights reserved.
//

#import "selectProvince.h"

@implementation selectProvince

-(id)init
{
    if (self = [super init]) {
    }
    return self;
}
+(selectProvince *) shardProvinceInfo// 单例
{
    static selectProvince *sharedInstance = nil;
    static dispatch_once_t oncePredicate;
    dispatch_once(&oncePredicate, ^{
        sharedInstance = [[self alloc] init];
    });
    
    return sharedInstance;
}

-(void)setClasscityArray:(NSMutableArray *)selectProvince
{
    self.ProvinceArray = selectProvince;
    self.ProvinceIsopenArray  = [[NSMutableArray alloc]init];
    self.ProvinceIdArray  = [[NSMutableArray alloc]init];
    self.ProvinceNameArray  = [[NSMutableArray alloc]init];
    
    for (NSDictionary *dict in selectProvince) {
        NSString *name = dict[@"name"];
        NSString *ProvinceId = [NSString stringWithFormat:@"%@",dict[@"id"]];
        NSString *ProvinceIsopen = [NSString stringWithFormat:@"%@",dict[@"isopen"]];
        [self.ProvinceIsopenArray addObject:ProvinceIsopen];
        [self.ProvinceIdArray addObject:ProvinceId];
        [self.ProvinceNameArray addObject:name];
    }
}

@end
